package org.nidy.programexercise.ListCollection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class ListCollection {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Collections.addAll(list,"张山丰","张翠山","赵敏","张无忌","韦一笑","韦小宝");
        //
        list.stream().filter(s -> s.startsWith("张")).limit(3).skip(1).forEach(System.out::println);
        Stream.concat(list.stream(), list.stream().filter(s -> s.startsWith("张")));

    }
}
